<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCollecttionsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('collecttion', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();
			//tinyint 3 收藏的数据类型，0为项目 1为设备 2为技术 3为机构
			$table->tinyInteger('type');
			//int 11 对应type的id，如type为0，则此处为项目id
			$table->integer('relate_id');

			$table->integer("uid");

			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('collecttions');
	}

}
